<?php
/**
 * @package		Joomla.Plugin
 * @subpackage	System.Jblibrary
 * @author		Joomla Bamboo - design@joomlabamboo.com
 * @copyright 	Copyright (c) 2013 Joomla Bamboo. All rights reserved.
 * @license		GNU General Public License version 2 or later; see LICENSE.txt
 * @version		2.1.4
 */

// no direct access
defined('_JEXEC') or die('Restricted access');

require_once JPATH_ROOT . '/media/plg_jblibrary/includes/defines.php';

JLoader::import('zen.form.element.adminassets', ZEN_LIBRARY_PATH);

/**
 * Form Field class to inject Javascript into JBLibrary Plugin admin form.
 *
 * @since 1.6.0
 */

class JElementAdminassets extends ZenFormElementAdminassets
{
	public function fetchElement($name, $value, &$node, $control_name)
	{
		parent::fetchElement($name, $value, &$node, $control_name);

		$doc = JFactory::getDocument();
		$doc->addScript(JURI::root(true) . '/media/plg_jblibrary/js/admin/config-scripts.j15.js');

		return '';
	}
}
